<?php

/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

/**
 * Smarty block function to display errors
 *
 * @category      Framework
 * @package       Pfw
 * @author        Sean Sitter <sean@picnicphp.com>
 * @copyright     2010 The Picnic PHP Framework
 * @license       http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
 * @link          http://www.picnicphp.com
 * @since         0.10
 */

function smarty_block_error($args, $content, &$smarty, &$repeat)
{
    if ($args['list'] != 1) {
        $content = "<li>$content</li>";
    }
    if(!$repeat) {
        $list = "<ul class=\"pfw-alert pfw-error\">\n";
            $list .= "{$content}\n";
        $list .= "</ul>";
        echo $list;
    }
}

?>
